Complete, copy-pasteable examples. Every example is self-contained: it shows the imports, the setup and the per-frame code. They build on each other, so if you are new to FluexGL DSP, start at the top.
New to the library, or an AI model working with it? Read the AI guide first. It explains the mental model and the pitfalls in one page.
| # | Example | Shows |
|---|---|---|
| 01 | Basic playback | Pipeline, audio device, channels, playing a clip |
| 02 | Effect chains | Worklet and native effects, compressor, removing effects |
| 03 | Spatial 2D: top-down game | 2D renderer, moving sources, rotating listener |
| 04 | Spatial 2D: side-scroller | 2D renderer without rotation, yAxis, rearLowpassFactor |
| 05 | Spatial 3D with three.js | 3D renderer, HRTF, following a camera |
| 06 | One-shot sounds | Sound, source.play(), fire-and-forget playAt(), instance limits |
| 07 | Debugging clusters | source.state, getClusters(), tuning clustering |
| 08 | Mixing and loudness | Music + world + UI, limiter, compressor, multiple renderers |
| 09 | Input and output devices | Microphone on an InputChannel, switching input and output devices at runtime |
| 10 | Splitting and merging | StereoMono, left/right and mid/side splits, pseudo surround |
| 11 | Proximity voice chat | WebRTC voices on InputChannels, positioned with attachChannel() |
| 12 | Game audio architecture | Buses per category, sources per object, playAt() for the rest, loop virtualization |
All examples assume the WebAssembly and worklet files are served under /bin/. See Getting started for how to get them.